package com.danciyixue.boot.dcyx.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.danciyixue.boot.dcyx.model.entity.DailyTimeRecords;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.danciyixue.boot.dcyx.model.query.DailyTimeRecordsQuery;
import com.danciyixue.boot.dcyx.model.vo.DailyTimeRecordsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.time.LocalDateTime;

/**
 * 用户每日时间记录Mapper接口
 *
 * @author youlaitech
 * @since 2025-06-28 10:26
 */
@Mapper
public interface DailyTimeRecordsMapper extends BaseMapper<DailyTimeRecords> {

    /**
     * 获取用户每日时间记录分页数据
     *
     * @param page 分页对象
     * @param queryParams 查询参数
     * @return {@link Page<DailyTimeRecordsVO>} 用户每日时间记录分页列表
     */
    Page<DailyTimeRecordsVO> getDailyTimeRecordsPage(Page<DailyTimeRecordsVO> page, DailyTimeRecordsQuery queryParams);

    /**
     * 获取用户当日时间记录
     *
     * @param userId 用户ID
     * @param recordDate 记录日期
     * @return 用户当日时间记录
     */
    DailyTimeRecords getTodayRecord(@Param("userId") Long userId, @Param("recordDate") LocalDateTime recordDate);

}
